package com.sample.rx3;

import com.sample.rx3.app.Rx3App;

import java.io.File;

public class MemoryUtil {
    private static final Rx3App baseApp = Rx3App.getInstance();
    private static final String DIR_PACKAGE = baseApp.getPackagePath();
    public static final String PATH_PRIVATE = DIR_PACKAGE;
    public static final String DIR_APK = PATH_PRIVATE + "apk" + File.separator;
    public static final String DIR_CRASH = PATH_PRIVATE + "crash" + File.separator;
    public static final String DIR_IMAGE = PATH_PRIVATE + "image" + File.separator;
    public static final String DIR_CACHE = PATH_PRIVATE + "cache" + File.separator;
    public static final String DIR_LOG = PATH_PRIVATE + "log" + File.separator;

    private static final String[] DIR_PATHS = {DIR_APK, DIR_CRASH,
            DIR_IMAGE, DIR_LOG, DIR_CACHE};

    public static void mkPkgDirs() {
        for (String path : DIR_PATHS) {
            new File(path).mkdirs();
        }
    }


}
